package com.example.pandaso.utils;

import org.springframework.web.client.RestTemplate;

public class HttpUtils {

    public static <T> T getObject(String url, Class<T> clazz) {
        RestTemplate restTemplate = new RestTemplate();
        return restTemplate.getForObject(url, clazz);
    }

    public static String getEntity(String url) {
        RestTemplate restTemplate = new RestTemplate();
        return restTemplate.getForEntity(url, String.class).getBody();
    }

}
